(define (zero? n) (= n 0))
(define (even? n) (= 0 (modulo n 2)))
(define (odd? n) (not (even? n)))

(define (to-binary* n)
  (if (zero? n)
      '()
      (if (even? n)
          (cons '0 (to-binary* (/ n 2)))
          (cons '1 (to-binary* (/ n 2))))))
(define (to-binary n) (reverse (to-binary* n)))

(define main
  (begin
    (print (to-binary 341512))
    (print '(1 0 1 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0))))
